package controlLayer;
import modelLayer.*;

public class CustomerCtr {
    
    private CustomerContainer customerContainer;
    
    public CustomerCtr() {
        customerContainer = CustomerContainer.getInstance();
    }
    
    public void createCustomer(String name, String phone, String email, String address, int cprNo) {
        Customer cust = new Customer(name, phone, email, address, cprNo);
        customerContainer.addCustomer(cust);
    }
    
    public Customer findCustomer(int ccpr) {
        Customer cust = customerContainer.findCustomer(ccpr);
        return cust;
    }
    
    public void removeCustomer(int cprNo) {
        Customer cust = findCustomer(cprNo);
        customerContainer.removeCustomer(cust);
    }
}
